@tmColor: #b7d4a8;

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font: bold 20px "Courier";
}

body {
  #main {
    width: 360px;
    height: 420px;
    background-color: @tmColor;
    border: 10px solid black;
    border-radius: 25px;
    margin: 50px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    .stage {
      width: 304px;
      height: 304px;
      border: 2px solid black;
      position: relative;
      .snake {
        & > div {
          width: 10px;
          height: 10px;
          background-color: black;
          border: 1px solid @tmColor;
          position: absolute;
        }
      }
      #food {
        width: 10px;
        height: 10px;
        // background-color: black;
        border: 1px solid @tmColor;
        position: absolute;
        left: 100px;
        display: flex;
        // 设置横轴为主轴，元素会自动换行
        flex-flow: row wrap;
        align-content: space-between;
        justify-content: space-between;
        div {
          width: 4px;
          height: 4px;
          background-color: black;
          transform: rotate(45deg);
        }
      }
    }
    .score-panel {
      width: 304px;
      display: flex;
      justify-content: space-between;
    }
  }
}
